<?php

/**
 * Description of MainNavigation
 *
 * @author Honza
 */
class NavigationMain implements INavigation {

  public static function getContent() {
    if (!isset($_GET[self::KEY])) {
      return self::getDefault();
    }
    
    $iMainBody = NULL;
    
    switch ($_GET[self::KEY]) {
      case 'user':
        $iMainBody = new ContentUser();
        break;
      case 'about':
        $iMainBody = new ContentAbout();
        break;
      case 'activities':
        $iMainBody = new ContentActivities();
        break;
      case 'catalog':
        $iMainBody = new ContentCatalog();
        break;
      case 'contact':
        $iMainBody = new ContentContact();
        break;
      case 'detail':
        $iMainBody = new ContentBook();
        break;
      case 'login':
        $iMainBody = new ContentLogin();
        break;
      case 'logout':
        $iMainBody = new ContentLogout();
        break;
      case 'register':
        $iMainBody = new ContentRegister();
        break;
      case 'employee':
        $iMainBody = new ContentEmployee();
        break;
      case 'news':
        $iMainBody = new ContentNews();
        break;
      case 'admin':
        $iMainBody = new ContentAdmin();
        break;
      default:
        return self::getDefault();
        break;
    }
    
    return self::wrap($iMainBody);
  }

  public static function getDefault() {
    return self::wrap(new ContentHome());
  }
  
  private static function wrap($iMainBody) {
    return MainBody::getMainBodyContent($iMainBody);
  }

}

?>
